package com.igrowing.easyRpc.error;

public enum ErrorCode {

    SUCCESS(0, "ok"),
    FAILED(1, "失败"),

    SYSTEM_ERROE(5000, "系统内部异常"),

    UN_LOAD(3, "类型未加载"),

    PARAM_ERROR(4, "参数异常"),

    NO_FOUND_SERVICE(40300, "服务未发现"),

    PROCOTOL_ERROR(5, "协议错误"),

    PROVIDER_ERROR(6, "服务提供端异常"),

    CONSUMER_ERROR(7, "服务消费端异常");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
